NIRS Graph for Animal Grant


In [1]:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
#have graphs in ipython notebook
%matplotlib inline 
import scipy.stats

In [2]:
df = pd.read_csv('/Users/John/Desktop/ROP Python/NIRSrawfigure.csv')

In [8]:
avgs = []
sems = []
for i in range(1,25):
    avgs.append(df[[i]].mean().values)
    sems.append(scipy.stats.sem(df[[i]], nan_policy='omit'))

In [9]:
print avgs


[array([ 79.7948718]), array([ 79.67948718]), array([ 79.12820513]), array([ 79.52380952]), array([ 79.76190476]), array([ 78.78205128]), array([ 78.88461538]), array([ 78.91666667]), array([ 79.95]), array([ 79.80952381]), array([ 79.34615385]), array([ 80.1]), array([ 80.33809524]), array([ 79.77380952]), array([ 78.48717949]), array([ 78.35119048]), array([ 77.27857143]), array([ 77.10952381]), array([ 78.04444444]), array([ 77.96666667]), array([ 78.63095238]), array([ 78.38095238]), array([ 78.49285714]), array([ 78.16666667])]

In [10]:
print sems


[masked_array(data = [1.518306365509035],
             mask = [False],
       fill_value = 1e+20)
, masked_array(data = [1.788044095517597],
             mask = [False],
       fill_value = 1e+20)
, masked_array(data = [1.9122630429466758],
             mask = [False],
       fill_value = 1e+20)
, masked_array(data = [1.8190298794037958],
             mask = [False],
       fill_value = 1e+20)
, masked_array(data = [1.8408698143636815],
             mask = [False],
       fill_value = 1e+20)
, masked_array(data = [1.722916659326145],
             mask = [False],
       fill_value = 1e+20)
, masked_array(data = [1.8033074054573008],
             mask = [False],
       fill_value = 1e+20)
, masked_array(data = [1.721067299814697],
             mask = [False],
       fill_value = 1e+20)
, masked_array(data = [2.0160368945563607],
             mask = [False],
       fill_value = 1e+20)
, masked_array(data = [1.7949577611242844],
             mask = [False],
       fill_value = 1e+20)
, masked_array(data = [1.957750098408317],
             mask = [False],
       fill_value = 1e+20)
, masked_array(data = [1.6522046541408957],
             mask = [False],
       fill_value = 1e+20)
, masked_array(data = [1.2387015984214274],
             mask = [False],
       fill_value = 1e+20)
, masked_array(data = [1.1114081451534261],
             mask = [False],
       fill_value = 1e+20)
, masked_array(data = [1.2982101333556753],
             mask = [False],
       fill_value = 1e+20)
, masked_array(data = [1.5240786807653037],
             mask = [False],
       fill_value = 1e+20)
, masked_array(data = [1.7368575305127096],
             mask = [False],
       fill_value = 1e+20)
, masked_array(data = [1.9208464650032477],
             mask = [False],
       fill_value = 1e+20)
, array([ 2.02813978]), masked_array(data = [1.9414381083784835],
             mask = [False],
       fill_value = 1e+20)
, masked_array(data = [2.0981835976423104],
             mask = [False],
       fill_value = 1e+20)
, masked_array(data = [2.2431845340989187],
             mask = [False],
       fill_value = 1e+20)
, masked_array(data = [2.323367463282007],
             mask = [False],
       fill_value = 1e+20)
, masked_array(data = [2.467864277265105],
             mask = [False],
       fill_value = 1e+20)
]

In [ ]: